package mysql

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ FutuTokenModel = (*customFutuTokenModel)(nil)

type (
	// FutuTokenModel is an interface to be customized, add more methods here,
	// and implement the added methods in customFutuTokenModel.
	FutuTokenModel interface {
		futuTokenModel
		withSession(session sqlx.Session) FutuTokenModel
	}

	customFutuTokenModel struct {
		*defaultFutuTokenModel
	}
)

// NewFutuTokenModel returns a model for the database table.
func NewFutuTokenModel(conn sqlx.SqlConn) FutuTokenModel {
	return &customFutuTokenModel{
		defaultFutuTokenModel: newFutuTokenModel(conn),
	}
}

func (m *customFutuTokenModel) withSession(session sqlx.Session) FutuTokenModel {
	return NewFutuTokenModel(sqlx.NewSqlConnFromSession(session))
}
